include $(LITEOSTOPDIR)/config.mk

MODULE_NAME := $(notdir $(shell pwd))

ifeq ($(LOSCFG_ARCH_CORTEX_A53), y)
    MMC_HOST_DIR := sdhci
    LOCAL_SRCS += host/$(MMC_HOST_DIR)/tune/sdhci_tune.c
else
    MMC_HOST_DIR := himci
    MMC_HOST_FLAG = -DCMD_STOP
endif

ifeq ($(LOSCFG_PLATFORM_HI3516EV200), y)
    MMC_HOST_DIR := sdhci
    LOCAL_SRCS += host/$(MMC_HOST_DIR)/tune/sdhci_tune_edge.c
    MMC_HOST_FLAG =
else ifeq ($(LOSCFG_PLATFORM_HI3516EV300), y)
    MMC_HOST_DIR := sdhci
    LOCAL_SRCS += host/$(MMC_HOST_DIR)/tune/sdhci_tune_edge.c
    MMC_HOST_FLAG =
else ifeq ($(LOSCFG_PLATFORM_HI3518EV300), y)
    MMC_HOST_DIR := sdhci
    LOCAL_SRCS += host/$(MMC_HOST_DIR)/tune/sdhci_tune_edge.c
    MMC_HOST_FLAG =
endif

LOCAL_SRCS += $(wildcard core/*.c host/$(MMC_HOST_DIR)/*.c)

ifeq ($(LOSCFG_FS_PROC), y)
LOCAL_SRCS += $(wildcard host/$(MMC_HOST_DIR)/proc/*.c)
endif
MMC_INCLUDE := -I $(LITEOSTOPDIR)/drivers/mmc/core
MMC_INCLUDE += -I $(LITEOSTOPDIR)/drivers/mmc/host/$(MMC_HOST_DIR)
LOCAL_FLAGS := $(MMC_INCLUDE) $(MMC_HOST_FLAG)

include $(MODULE)
